<!--
  ~ Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<html>
<body>
报告组合字面量中的冗余类型声明。
<p>示例：</p>
<pre><code>nums := [][]int{[]int{1}, []int{2}}</code></pre>
<p>这是一个 <code>int</code> 类型的切片的切片。 在这种情况下，您可以使用较短的定义。 您可以手动修正此代码，也可以使用<b>删除冗余类型</b>快速修复。 应用快速修复后，代码如下所示：</p>
<pre><code>nums := [][]int{{1},{2}}</code></pre>
<p>有关组合字面量的详细信息，请参阅 <a href="https://go.dev/ref/spec#Composite_literals">go.dev 上的 Go Language Specification: Composite Literals</a>。</p>
</body>
</html>